Skip to content

feat: add a monospace font select list to app settings - #52

Open
BlakeGardner wants to merge 1 commit into
singularityos-lab:mainfrom
BlakeGardner:feat/monospace-font-selector
Open

BlakeGardner wants to merge 1 commit into
singularityos-lab:mainfrom
BlakeGardner:feat/monospace-font-selector

Conversation

@BlakeGardner

@BlakeGardner BlakeGardner commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds a monospace-font-selector widget type for app settings descriptors. On a string key it shows a list of the installed monospace font families, instead of a free-text entry. The saved value is always in the list, so a font that is no longer installed stays visible.

Needs singularityos-lab/libsingularity#23, which adds the MonospaceFontRow this uses.

Generative AI assistance

AI assistance: disclosed

@mirkobrombin

Copy link
Copy Markdown
Member

Thanks, this works as described and the "current value always stays in the list" detail is a nice touch.

One thing about where it lives. The widget types for app settings are a libsingularity contract: app_settings_loader.vala documents the accepted values (toggle, slider, combo, entry, color-scheme-selector). With this change monospace-font-selector exists only in the shell page and is not declared there, so an app author reading the loader docs would not know it is available.

The list of installed monospace families is also something other apps will want (an editor, a terminal), so it would be better as a shared row in libsingularity than as a private helper of this page.

Could you:

  1. add the new widget value to the loader documentation in libsingularity,
  2. move the font listing into a reusable row there (a SelectionRow subclass or a small helper next to it), and use it from this page.

Happy to merge once it sits in the shared layer.

App settings descriptors can use the "monospace-font-selector" widget on
a string key to get a collapsible list of the installed monospace font
families instead of a free-text entry. The list is libsingularity's
MonospaceFontRow.

Assisted-by: Claude:claude-fable-5-2
AI-Scope: The monospace-font-selector settings row, from a request to make Leafs' font family a select list of monospace fonts
@BlakeGardner

Copy link
Copy Markdown
Contributor Author

Thanks, this works as described and the "current value always stays in the list" detail is a nice touch.

One thing about where it lives. The widget types for app settings are a libsingularity contract: app_settings_loader.vala documents the accepted values (toggle, slider, combo, entry, color-scheme-selector). With this change monospace-font-selector exists only in the shell page and is not declared there, so an app author reading the loader docs would not know it is available.

The list of installed monospace families is also something other apps will want (an editor, a terminal), so it would be better as a shared row in libsingularity than as a private helper of this page.

Could you:

  1. add the new widget value to the loader documentation in libsingularity,
  2. move the font listing into a reusable row there (a SelectionRow subclass or a small helper next to it), and use it from this page.

Happy to merge once it sits in the shared layer.

Thanks for the feedback. I moved the font list into libsingularity as MonospaceFontRow and documented the widget value: singularityos-lab/libsingularity#23. This PR was updated to use it.

Suggested merge order:

  1. libsingularity: singularityos-lab/libsingularity#23
  2. Shell: singularityos-lab/singularity-shell#52 -- This PR
  3. Leafs: singularityos-lab/singularity-leafs#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants